package ar.com.vates.threads3;

public class Cuenta {

	private int saldo;

	public Cuenta() {
		this.saldo = 50;
	}

	public synchronized int getSaldo() {
		return this.saldo;
	}

	public synchronized boolean retirar(int monto) {
		if (saldo >= 10) {
			saldo -= monto;
			return true;
		}
		return false;
	}

	public synchronized boolean isSobregirada() {
		if (saldo < 0)
			return true;
		return false;
	}
}